<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/6/29
 * Time: 15:02
 */

namespace ElementVip\JwOms\Models;


use Illuminate\Database\Eloquent\Model;

class OmsUploadLog extends Model
{
    protected $table = 'el_oms_upload_log';
    protected $guarded = ['id'];

    public function getLastTag($type)
    {
        if ($tag = $this->where('type', $type)->where('status', 1)->get()->last()) {
            return $tag->last_tag;
        }
        return 0;
    }
}